package cn.lyvust.demo.shili06;

/**
 * Description:
 * date: 2021-5-11 22:45
 *
 * @author Guo_guo
 * @since JDK 1.8
 */
public class ZhangsanRunnable implements Runnable{

    @Override
    public void run() {
        try {
            System.out.println("线程t在运行！");
            Thread.sleep(500);
            System.out.println("线程t在短时间睡眠后重新运行！");
        } catch (InterruptedException IE) {
            System.out.println("线程被中断");
        }
    }

    public static void main(String args[]) {
        Thread t=new Thread(new ZhangsanRunnable());
        System.out.println ("线程 t 为新建！");
        t.start();
        System.out.println ("线程 t 为就绪！");
    }
}
